Next | Prev | Up | Top | Contents | Index

Returning Opaque Handle Data

Use the v_gethandle macro to get the unique identifier associated with vt, the opaque handle to the user's virtual address space. (The term "opaque" indicates that your code does not directly deal with the members of this structure, which is likely to change from release to release.)

#include "sys/region.h"
unsigned  v_gethandle(vt);
vhandl_t  *vt;
Because the virtual handle points into the kernel stack, it is likely to be overridden. Use v_gethandle if your driver must "remember" several virtual handles. Various other macros are also defined in sys/region.h, including macros that get the user virtual address to which the device space is mapped; macros that get the inode associated with the special file; and macros that get the length (in pages) of the user's mapped space.



Next | Prev | Up | Top | Contents | Index